package com.xzst.jacksonxml.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import com.xzst.jacksonxml.util.XmlUtil;
import lombok.Value;
import lombok.*;
import lombok.extern.slf4j.Slf4j;

import java.io.IOException;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Date;

/**
 * @Author:liukexin
 * @DATE:2019-06-19 16:48
 * 电信用户登记资料信息查询
 */
@Builder
@Getter
@Setter
@ToString
@Slf4j
@NoArgsConstructor
@AllArgsConstructor
@JacksonXmlRootElement(localName = "RBSPMessage")
public class RBSPMessage implements Serializable {
    private static final long serialVersionUID = 1962239276256408563L;
    /**
     * 版本号
     */
    @JacksonXmlProperty(localName = "Version")
    private String version;

    /**
     * 请求方ID
     */
    @JacksonXmlProperty(localName = "SenderID")
    private String senderId;

    /**
     * 登录信息
     */
    @JacksonXmlProperty(localName = "LoginInfo")
    private LoginInfo loginInfo;

    /**
     * 时间戳
     */
    @JacksonXmlProperty(localName = "TimeStamp")
    @JsonFormat(pattern = "yyyyMMddHHmmss")
    private Date timeStamp;

    @JacksonXmlProperty(localName = "Validity")
    private String validity;

    @JacksonXmlProperty(localName = "Security")
    private String security;

    @JacksonXmlProperty(localName = "Method")
    private Method method;
}
